/*
 * @Author: mark
 * @Date: 2023-05-11 09:16:42
 * @LastEditors: mark
 * @LastEditTime: 2023-07-03 15:00:48
 * @Description: file content
 */
// formData接口
export const formData = (url: string): any => {
  const state = url.includes('/login') || url.includes('/auth/OOSLogin');
  if (state) {
    return true;
  } else {
    return false;
  }
};
// 导出文件接口
export const exports = (url: string): any => {
  const state =
    url.includes('/syslog/operlog/export') ||
    url.includes('/system/app/download');
  if (state) {
    return true;
  } else {
    return false;
  }
};

export const updateData = (url: string): any => {
  const state =
    url.includes('/system/user/add') ||
    url.includes('/system/user/edit') ||
    url.includes('/system/user/changeStatus') ||
    url.includes('/system/post/add') ||
    url.includes('/system/user/del') ||
    url.includes('/system/dept/del') ||
    url === '/system/usergroup/del' ||
    url === '/system/usergroup/add' ||
    url.includes('/system/usergroup/edit') ||
    url.includes('/system/dept/add') ||
    url.includes('/system/dept/edit') ||
    url.includes('/system/prop/edit') ||
    url.includes('/system/prop/del') ||
    url.includes('/system/prop/add') ||
    url.includes('/system/temporary/approval') ||
    url.includes('/system/temporary/add') ||
    url.includes('/system/passwords/del') ||
    url.includes('/system/passwords/edit') ||
    url.includes('/system/passwords/add') ||
    url.includes('/system/menu/del') ||
    url.includes('/system/menu/save') ||
    url.includes('/system/menu/edit') ||
    url.includes('/system/role/save') ||
    url.includes('/system/role/edit') ||
    url.includes('/system/role/del') ||
    url.includes('/system/role/dataScope') ||
    url.includes('/system/area/save') ||
    url.includes('/system/area/update') ||
    url.includes('/system/area/delete') ||
    url.includes('/system/identity/add') ||
    url.includes('/system/identity/edit') ||
    url.includes('/system/identity/del') ||
    url.includes('/system/correspondence/edit') ||
    url.includes('/system/correspondence/add') ||
    url.includes('/system/post/edit') ||
    url.includes('/system/post/save') ||
    url.includes('/system/role/authUser/selectAll') ||
    url.includes('/system/user/authRoles') ||
    url.includes('/system/role/authUser/cancel') ||
    url.includes('/system/dept/batchDown') ||
    url.includes('/system/post/batchDown') ||
    url.includes('/system/userApp/sendAppUserDownLinstenerData') ||
    url.includes('/resources/login/updateUserPassword') ||
    url.includes('/system/user/resetPwd') ||
    url.includes('/system/app/appOAuth') ||
    url.includes('/system/attribute/insertDefinition') ||
    url.includes('/system/person/add') ||
    url.includes('/system/person/edit') ||
    url.includes('/system/attribute/updateDefinition') ||
    url.includes('/system/attribute/deleteDefinition') ||
    url.includes('/system/attributeOrg/add') ||
    url.includes('/system/attributeOrg/edit') ||
    url.includes('/system/relation/add') ||
    url.includes('/system/relation/edit') ||
    url.includes('/system/attributePost/add') ||
    url.includes('/system/attributePost/edit') ||
    url.includes('/system/sysattributepost/add') ||
    url.includes('/system/sysattributepost/edit') ||
    url.includes('/system/userApp/insertAppUser') ||
    url.includes('/system/userApp/del') ||
    url.includes('/system/userApp/associatedOrphanAccount') ||
    url.includes('/system/strategy/insertStrategy') ||
    url.includes('/system/strategy/updateStrategy') ||
    url.includes('/system/newAppIns/addAppIns') ||
    url.includes('/system/strategy/editState') ||
    url.includes('/system/app/appSaveMatchingRules') ||
    url.includes('/system/app/add') ||
    url.includes('/system/app/edit');
  if (state) {
    return true;
  } else {
    return false;
  }
};

// formData接口
export const formDatas = (url: string): any => {
  const state =
    url.includes('/system/attributeOrg/del') ||
    url.includes('/system/relation/del') ||
    url.includes('/resources/login/checkFreemarker') ||
    url.includes('/resources/login/checkPhoneMessage') ||
    url.includes('/resources/login/sendPhoneMessage') ||
    url.includes('/system/person/del') ||
    url.includes('/system/attributePost/del') ||
    url.includes('/system/sysattributepost/del') ||
    url.includes('/system/app/importExcelSubject') ||
    url.includes('/system/identity/del') ||
    url.includes('/system/correspondence/del') ||
    url.includes('/resources/login/accountPassword') ||
    url.includes('/auth/OOSLogin');
  // || url.includes('/system/strategy/selectStrategy')

  if (state) {
    return true;
  } else {
    return false;
  }
};
